package com.example.learnvideo.base

import android.os.Bundle
import androidx.appcompat.app.AppCompatActivity
import androidx.databinding.ViewDataBinding
import com.example.learnvideo.extension.getViewBinding

/**
 *
 * @Author： LJH
 * @Time： 2022/5/31
 * @description：
 */
abstract class BaseActivity<VB:ViewDataBinding>:AppCompatActivity(), BaseBinding<VB> {
    internal val mBinding: VB by lazy(mode = LazyThreadSafetyMode.NONE) {
        getViewBinding(layoutInflater)
    }
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(mBinding.root)
        mBinding.initBinding()
    }
}